﻿/*
 * Created by SharpDevelop.
 * User: Intel
 * Date: 05.06.2014
 * Time: 9:47
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;

namespace Region.Forms
{
  /// <summary>
  /// Description of InputBox.
  /// </summary>
  public partial class InputDialog : Form
  {
    String Value;
    InputDialog(String Caption,String Title,String Text)
    {
      //
      // The InitializeComponent() call is required for Windows Forms designer support.
      //
      Value = Text;
      InitializeComponent();
      label1.Text = Caption;
      this.Text = Title;
      textBox1.Text = Text;
      //
      // TODO: Add constructor code after the InitializeComponent() call.
      //
    }
    public static String Input(String Caption,String Title,String Text)
    {
      var form  = new InputDialog(Caption,Title,Text);
      form.ShowDialog();
      return form.Value;
    }
		void ButtonOKClick(object sender, System.EventArgs e)
		{
		  Value=textBox1.Text;
		  Close();
		}
  }
}
